home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / 422mods.zip / DR01.422 < prev    next >
Text File  |  1993-03-04  |  4KB  |  90 lines

  1. DR01.MOD
  2. Dr. Tweez #1 @3653
  3. Fri Feb 26 16:12:48 1993
  4. ┌────────────────────────────────────────────────────────────────────────────┐
  5. │ Mod Name: DR01.MOD                Mod Author: Dr. Tweez 1@3653 SOLARnet    │
  6. │ Difficulty:  ██▒▒▒▒▒▒▒▒▒                                1@3650 GATEWAY     │
  7. │ WWIV Version:  4.22               DATE: 02/27/93                           │
  8. │ Files Affected: FCNS.H, BBS.C, LILO.C                                      │
  9. │ Description: Adds a second password for Co-SysOp, and a bit of added       │
  10. │              security.                                                     │
  11. └────────────────────────────────────────────────────────────────────────────┘
  12.  
  13.     I knew that there was a mod out there that would let you have your co-sysop
  14. enter a seperate PW while logging on, other than the system password out there,
  15. but I never could find it so I wrote this little mod that would do so, and it
  16. can also be used as extra security by adding it to the sysop functions.
  17.  
  18. First open up BBS.C and go down below the int checkpw(void) and add this below
  19. it.
  20.  
  21.  
  22. int checkpw1(void)                              /* DR01 */
  23. {                                               /* DR01 */
  24.   char s[81];                                   /* DR01 */
  25.                                                 /* DR01 */
  26.   nl();                                         /* DR01 */
  27.   npr("3[1Maintenance3] 2■ 7");            /* DR01 */
  28.   echo=0;                                       /* DR01 */
  29.   input(s,20);                                  /* DR01 */
  30.   echo=1;                                       /* DR01 */
  31.   if (strcmp(s,"PASSWORDHERE")==0)    /* Put in the Co-SysOp PW Here */
  32.     return(1);                                  /* DR01 */
  33.   else                                          /* DR01 */
  34.     return(0);                                  /* DR01 */
  35. }                                               /* DR01 */
  36.  
  37.  
  38. Ok, now real quick load up FCNS.H and add int checkpw1(void) right after
  39. int checkpw(void).  Save FCNS.H and lets move on.
  40.  
  41. Go down to the sysop functions in the main menu.  Now its simple to add what
  42. commands you want the bbs to ask for the Co-SysOp PW, its like this:
  43.  
  44.     if (strcmp(s,"LOG")==0) {
  45.     if (checkpw1()) {                                /* DR01 ADD */
  46.       sl1(3,s1);
  47.       printfile(s1);
  48.       }                                              /* DR01 ADD */
  49.     }
  50.  
  51. That is all you have to add to any of the sysop functions in the main menu.
  52. it will work on all of them, all you have to do is add those two lines.
  53.  
  54. Now you say that you want the Co-SysOp to enter the Co-SysOp Password when he
  55. loggs on, ok, open up LILO.C and do this:
  56.  
  57.  
  58.       if ((thisuser.sl==255) && (incom) && (ok)) {
  59.         npr("3[1Administrator3] 2■ 7");
  60.         echo=0;
  61.         input(s,20);
  62.         if (strcmp(s,syscfg.systempw)!=0)               /* Search for */
  63.           ok=0;                                         /* Existing Line */
  64.       }                                                 /* Existing Line */
  65.       if ((thisuser.sl==100) && (incom) && (ok)) {      /* DR01 ADD */
  66.         npr("3[Maintenance3] 2■ 7");                /* DR01 ADD */
  67.         echo=0;                                         /* DR01 ADD */
  68.         input(s,20);                                    /* DR01 ADD */
  69.         if (strcmp(s,"PUTPASSWORDHERE")!=0)             /* DR01 ADD */
  70.           ok=0;                                         /* DR01 ADD */
  71.       }                                                 /* DR01 ADD */
  72.       echo=1;                                           /* Original code  */
  73.       if (ok) {                                         /* Picks up here  */
  74.         reset_act_sl();
  75.         changedsl();
  76.       } else {
  77.  
  78.  
  79. Now all you have to do is MAKE FCNS, and then MAKE your board.
  80.  
  81.  
  82. Well kids that is it, I know its simple, but hey thats the kinda guy I am.
  83.  
  84. And as always, I am not responsible for this mod, if it causes your board to
  85. reproduce, move in with your grandma, and have sex with her.
  86.  
  87.  
  88.  
  89.  
  90.